#include <iostream>
int main()
{
	int  n, m;
	std::cin >> n >> m;
	int cnt = 0,cnt2 = 0;
	for (int i = 0; i <= n; i++)
	{
		for (int j = 0; j <= m;j++)
		{
			for (int k = i+1; k <= n; k++)
			{
				for (int l = j+1; l <= m; l++)
				{
					if (k - i == l - j)cnt++;
					else cnt2++;
				}
			}
		}
	}
	std::cout << cnt << " " << cnt2;
	return 0;
}